import request from '@/utils/request'

export function list(tenantId) {
  return request({
    url: '/ss/organization/list',
    method: 'get',
    params: {tenantId}
  })
}

export function listCampus(tenantId, name) {
  return request({
    url: '/ss/organization/listCampus',
    method: 'get',
    params: {tenantId, name}
  })
}

export function init(id) {
  return request({
    url: '/ss/organization/init',
    method: 'get',
    params: {id}
  })
}

export function deleteOrg(id) {
  return request({
    url: '/ss/organization/delete',
    method: 'get',
    params: {id}
  })
}

export function getUserAccount(orgId) {
  return request({
    url: '/ss/organization/useraccount/get',
    method: 'get',
    params: {orgId}
  })
}

export function add(data) {
  return request({
    url: '/ss/organization/add',
    method: 'post',
    data: data
  })
}

export function createUserAccount(data) {
  return request({
    url: '/ss/organization/useraccount/create',
    method: 'post',
    data: data
  })
}

